.class final Lcom/burstly/lib/network/request/DownloadServerListTask;
.super Lcom/burstly/lib/network/request/BurstlyRequestTask;
.source "DownloadServerListTask.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Lcom/burstly/lib/network/request/BurstlyRequestTask",
        "<TT;>;"
    }
.end annotation


# direct methods
.method constructor <init>(Lcom/burstly/lib/network/beans/cookie/ICookieRequest;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)V
    .locals 1
    .parameter "postObject"
    .parameter "uri"
    .parameter
    .parameter "burstlyViewId"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/burstly/lib/network/beans/cookie/ICookieRequest;",
            "Ljava/lang/String;",
            "Ljava/lang/Class",
            "<TT;>;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .prologue
    .line 49
    .local p0, this:Lcom/burstly/lib/network/request/DownloadServerListTask;,"Lcom/burstly/lib/network/request/DownloadServerListTask<TT;>;"
    .local p3, classToConvertResposeTo:Ljava/lang/Class;,"Ljava/lang/Class<TT;>;"
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/burstly/lib/network/request/BurstlyRequestTask;-><init>(Lcom/burstly/lib/network/beans/cookie/ICookieRequest;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)V

    .line 50
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/burstly/lib/network/request/DownloadServerListTask;->setShouldUseSecondLevelServers(Z)V

    .line 51
    return-void
.end method


# virtual methods
.method protected handleConnectLogic(Lorg/apache/http/HttpHost;Lorg/apache/http/client/methods/HttpPost;)Ljava/lang/String;
    .locals 10
    .parameter "target"
    .parameter "postRequest"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/UnsupportedEncodingException;,
            Ljava/io/IOException;,
            Lorg/apache/http/client/ClientProtocolException;
        }
    .end annotation

    .prologue
    .local p0, this:Lcom/burstly/lib/network/request/DownloadServerListTask;,"Lcom/burstly/lib/network/request/DownloadServerListTask<TT;>;"
    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 58
    invoke-static {p1, p2}, Lcom/burstly/lib/util/Utils;->makeRequest(Lorg/apache/http/HttpHost;Lorg/apache/http/client/methods/HttpRequestBase;)Lorg/apache/http/HttpResponse;

    move-result-object v1

    .line 59
    .local v1, response:Lorg/apache/http/HttpResponse;
    invoke-interface {v1}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v3

    invoke-interface {v3}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v2

    .line 61
    .local v2, status:I
    const/16 v3, 0xc8

    if-eq v2, v3, :cond_0

    .line 62
    sget-object v3, Lcom/burstly/lib/network/request/DownloadServerListTask;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v4, "BurstlyRequestTask"

    const-string v5, "Request to {0} has finished with {1} http status."

    const/4 v6, 0x2

    new-array v6, v6, [Ljava/lang/Object;

    invoke-virtual {p1}, Lorg/apache/http/HttpHost;->getHostName()Ljava/lang/String;

    move-result-object v7

    aput-object v7, v6, v8

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    aput-object v7, v6, v9

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 64
    const/4 v0, 0x0

    .line 68
    :goto_0
    return-object v0

    .line 66
    :cond_0
    invoke-interface {v1}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v3

    const-string v4, "utf-8"

    invoke-static {v3, v4}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 67
    .local v0, rawResponseData:Ljava/lang/String;
    sget-object v3, Lcom/burstly/lib/network/request/DownloadServerListTask;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v4, "BurstlyRequestTask"

    const-string v5, "Raw response data : {0}"

    new-array v6, v9, [Ljava/lang/Object;

    aput-object v0, v6, v8

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0
.end method
